package com.senven.common.entity;

import com.baomidou.mybatisplus.annotation.*;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;


import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;


@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "用户类")
public class User  implements Serializable {
    @ApiModelProperty(value = "编号")
    @TableId(type = IdType.ASSIGN_ID)
    private String id;
    @ApiModelProperty(value = "用户名")
    private String username;

    @ApiModelProperty(value = "用户密码")
    private String password;
    @ApiModelProperty(value = "用户电话")
    private String tel;
    @ApiModelProperty(value = "用户地址")
    private String address;
    @ApiModelProperty(value = "用户密码盐度")
    private String salt;
    @ApiModelProperty(value = "用户头像地址")
    private String url;
    @ApiModelProperty(value = "用户真实姓名")

    private String realname;


    @ApiModelProperty("逻辑删除 1（true）已删除， 0（false）未删除")
    @TableLogic(value = "0",delval = "1")
    @TableField(value = "is_deleted")
    private Boolean isDeleted;
    //创建时间
    @ApiModelProperty(value = "创建用户信息")
    @TableField(fill = FieldFill.INSERT,value = "gmt_create")
    private LocalDateTime gmtCreate;
     //注销时间
     @ApiModelProperty(value = "注销用户信息")
  //  @TableField(fill = FieldFill.UPDATE)
    private LocalDateTime gmtModiffed;


    @ApiModelProperty(value = "用户角色类")
    @TableField(exist = false)
    private Role role;
    @ApiModelProperty(value = "用户角色名字")
    @TableField(exist = false,value = "role_name")
    private String roleName;

}
